
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
	<title>Metfind móvil</title>
	<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0"/>
	<?php
header('Content-Type: text/html; charset=UTF-8');
?>

	<link href="<?php echo base_url()?>assets/css/jquery-ui/flick/flick.css"	rel="stylesheet" type="text/css">
	<link href="<?php echo base_url()?>assets/css/mycss.css"	rel="stylesheet" type="text/css">
	
	
	<script src="<?php echo base_url()?>assets/js/jquery/1.10.2.js"	type="text/javascript"></script>
	<script src="<?php echo base_url()?>assets/js/jquery-ui/1.10.3.js"	type="text/javascript"></script>
	<script src="<?php echo base_url()?>assets/js/jquery-ui/jqueryuitp.js"	type="text/javascript"></script>
	<script src="<?php echo base_url()?>assets/js/autosizeta/1.18.0.min.js"	type="text/javascript"></script>
	<script src="<?php echo base_url()?>assets/js/preload/1.0.2.js"	type="text/javascript"></script>	
	<script src="<?php echo base_url()?>assets/js/myjs.js"	type="text/javascript"></script>

	<script type="text/javascript">
	$(document).ready(function()
	{
		$.preload(
			"<?php echo base_url()?>assets/images/buttons/footer/homes.png",
			"<?php echo base_url()?>assets/images/buttons/footer/employees.png",
			"<?php echo base_url()?>assets/images/buttons/footer/writes.png",
			"<?php echo base_url()?>assets/images/buttons/footer/infos.png",
			"<?php echo base_url()?>assets/images/buttons/footer/sends.png")

		
		doneFooter=function(msg)
		{
			$('#footer').html(msg);
			
			$('.footer-menu-item').each(function() 
			{
				//FUNCION AL CLICKEAR ELEMENTO DEL ELEMENTO DEL MENU
				$(this).click(function()
				{
					//SI SE CLICKEO UN ELEMENTO QUE NO CORRESPONDE AL LUGAR EN QUE YA ESTOY
					if($(this).attr('id').slice(-2)!='-s')
					{
						var pos;
						//VIENDO CUAL SE CLICKEO Y CAMBIANDO COLOR
						$('.footer-menu-item').each(function() 
						{
							if($(this).attr('id').slice(-2)=='-s')
							{
								pos=$(this);
								$(this).attr('id',$(this).attr('id').substring(0, $(this).attr('id').length-2));
							}	
						});
						$(this).attr('id',$(this).attr('id')+'-s');


						

						//GUARDANDO COOKIES ANTES DE CAMBIAR DE LUGAR, desde home
						var to=$(this)
						if(pos.attr('name')=='Home')
						{
							var data1=[];
							//var data="";
							$(".home-item-slider").each(function()
							{
								var data2=[];
								
								$(this).children().each(function()
								{	
									data2.push($(this).attr('QERID'));
									data2.push($(this).slider( "option", "value" ));
								});
								data1.push(data2);
							});
							
							done=function()
							{
								simpleLoader("<?php echo base_url()."maincontroller/"?>AJAX_"+to.attr("name"),$("#container"));
							}
							saveQE(data1,'<?php echo base_url()."maincontroller/"?>sessQE',done);
						}
						//GUARDANDO COOKIES ANTES DE CAMBIAR DE LUGAR, desde employee
						else if(pos.attr('name')=='Employee')
						{
							var data1=[]
							$(".employee-ev-slider").each(function()
							{
								var data2=[];
								
								$(this).children().each(function()
								{	
									data2.push($(this).attr('EERID'));
									data2.push($(this).slider( "option", "value" ));
									
								});
								data2.push($(this).parent().children("textarea").val());
								data1.push(data2);
							});
							
							done=function()
							{
								simpleLoader("<?php echo base_url()."maincontroller/"?>AJAX_"+to.attr("name"),$("#container"));
							}
							saveEE(data1,'<?php echo base_url()."maincontroller/"?>sessEE',done);

						}
						//GUARDANDO COOKIES ANTES DE CAMBIAR DE LUGAR, desde Write
						else if(pos.attr('name')=='Write')
						{


							data1=$("#commentTa").val();
							done=function()
							{
								simpleLoader("<?php echo base_url()."maincontroller/"?>AJAX_"+to.attr("name"),$("#container"));
							}
							saveCO(data1,'<?php echo base_url()."maincontroller/"?>sessCO',done);
							
						}
						
						else simpleLoader("<?php echo base_url()."maincontroller/"?>AJAX_"+$(this).attr("name"),$("#container"));
						
						
						
						
					}
				});
			});
		}
				
		simpleLoader('<?php echo base_url()?>maincontroller/AJAX_Header',$("#header"));
		simpleLoader('<?php echo base_url()?>maincontroller/AJAX_Home',$("#container"));
		simpleLoader('<?php echo base_url()?>maincontroller/AJAX_Footer',$("#footer"),null,doneFooter);
	
		
	});
	</script>
	<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26528120-3']);
  _gaq.push(['_setDomainName', 'metfind.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body>

<div id="header">h</div>

<div id="container">c</div>

<div id="footer">f</div>

<div style="text-align:center;margin-bottom:65px;">
<div class="h-line"></div>
	<p>
		Metfind Ltda. Copyright 2013
		<br>
		Todos los derechos reservados.
	</p>
	<br>
</div>
</body>
</html>